Implement SCALE encoding and serde deserialization#19
Merged
Conversation
Robbepop
suggested changes
Aug 18, 2020
Comment on lines
+45
to
+46
| /// The string type. | ||
| type String: Serialize + PartialEq + Eq + PartialOrd + Ord + Clone + core::fmt::Debug; |
Contributor
There was a problem hiding this comment.
While I like the overall idea I think it is better in this case to opt-into KISS (keep it simple stupid) and instead convert all &'static str simply into String. The &'static str was used in the beginning when we did not need deserialization in ink!. Now that we want to support Substrate we need it. However, if we do not generate metadata in any performance critical code section we don't need to opt-in for maximum performance and can instead opt-into simple code.
Contributor
Author
There was a problem hiding this comment.
I've removed the OwnedForm now, but kept MetaForm as & 'static str, and changed CompactForm to String. Let me know what you think.
This was referenced Sep 9, 2020
Merged
ascjones
added a commit
that referenced
this pull request
Dec 7, 2020
Potentially in future reintroduce OwnedForm #19 (comment)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #4 (rel type-metadata/type-metadata#38).
Introduces
OwnedFormandRegistryReadOnlyto allow SCALE decoding and JSON deserialization.scaleandserde, maybe decoding specific forno_std